          <?php $errorDim = Yii::app()->user->hasFlash('errorDim') ? unserialize(Yii::app()->user->getFlash('errorDim')) : null ?>
          <!-- START OF MAINCOL -->
          <div class="MainCol AddEbookPage">
          	  <h1>编辑心理测试二次维度</h1>
              <div class="right"><a href="#add_dim" class="Blue_btn" title="add new ebook"><span><?= CHtml::image(Yii::app()->baseUrl.'/images/add_icon.gif', '', array('class' => 'icon')); ?> 添加新二次维度</span></a>
              </div>
              <span class="NormalFont SmallFont">
                  <?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?> > 心理测试管理 > 编辑心理测试主题 > 编辑心理测试二次维度
               </span><br /><br />
              <div class="Titlebox box"><!-- DON'T DELETE --></div>

              <?php if(Yii::app()->user->hasFlash('successMessage')) : ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo Yii::app()->user->getFlash('successMessage'); ?></span>
              </div>
              <?php endif; ?>

	            <?php if($errorDim !== null) : ?>
	            <?php echo CHtml::errorSummary($errorDim) ?>
	            <?php endif ?>

              <?php echo CHtml::form(array('/admin/psytest/updatesecdim')) ?>
              <?php echo CHtml::activeHiddenField($secDim, 'secDimId') ?>
                <?php if($secDim->topic->getTypeCatalog() == 'mark' && count($secDim->topic->dimens) > 0) : ?>
              <div class="Smallbox"><label>维度置位符</label>
              <table>
              <?php foreach($secDim->topic->dimens as $dim) : ?>
                <tr><td><?php echo $dim->dimensDescr ?>：</td><td><?php echo $dim->getReplacer() ?></td></tr>
              <?php endforeach ?>
            </table>
              </div>
              <?php endif ?>

              <div class="Smallbox"><label>标识<span class="Red">*</span></label>
              <?php echo CHtml::activeTextfield($secDim, 'sku', array('class' => 'TxtInput', 'style' => 'width: 340px')) ?>
              </div>
              
              <div class="Smallbox"><label>公式<span class="Red">*</span></label>
              <?php echo CHtml::activeTextfield($secDim, 'formula', array('class' => 'TxtInput', 'style' => 'width: 340px')) ?>
              </div>

              <div class="Smallbox"><label>说明<span class="Red">*</span></label>
                <?php /* $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
                    "model"=>$secDim,				# Data-Model
                    "attribute"=>'dimDescr',			# Attribute in the Data-Model
                    "height"=>'300px',
                    "width"=>'100%',
                    "toolbarSet"=>'Default', 			# EXISTING(!) Toolbar (see: fckeditor.js)
                    "fckeditor"=>Yii::app()->basePath."/../assets/fckeditor/fckeditor.php",
                                                    # Path to fckeditor.php
                    "fckBasePath"=>Yii::app()->baseUrl."/assets/fckeditor/",
                                                    # Realtive Path to the Editor (from Web-Root)
                    "config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/common.css',),
                                                    # Additional Parameter (Can't configure a Toolbar dynamicly)
                ) ); */?>
                <?php echo CHtml::activeTextField($secDim, 'dimDescr', array('class' => 'TxtInput', 'style' => 'width: 340px')) ?>
              </div>

              <div class="Smallbox btnBox"><label>&nbsp;</label>
              <?= CHtml::submitButton('提交'); ?>
              </div>

              <?php echo CHtml::endForm() ?>
              <div class="Smallbox btnBox"><label>&nbsp;</label>
              <?= CHtml::link('返回', array('admin/psytest/editsecdims', 'id' => $secDim->topicId)); ?>
              </div>
          </div>
          <!-- END OF MAINCOL -->
